import { GET_USER_INFO, CLEAR_USER_INFO } from '../actionTypes'

export default function user (state = {}, action) {
  console.log(action, 'user')
  if (action.type === GET_USER_INFO) {
    return action.payload
  } else if (action.type === CLEAR_USER_INFO) {
    return {}
  } else {
    return state
  }
}
